package com.ruoyi.aitqjkj.service;


import cn.hutool.core.util.StrUtil;
import com.ruoyi.aitcommon.anotation.ServiceLog;
import com.ruoyi.aitcommon.service.SQLService;
import com.ruoyi.aitu9c.service.U9RestService;
import org.apache.velocity.runtime.directive.Foreach;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.hash.ObjectHashMapper;
import org.springframework.stereotype.Service;

import java.util.*;

@Service
public class QJService {
    @Autowired
    U9RestService u9rest;
    @Autowired
    SQLService sqlService;


    @ServiceLog("客户档案修改次级循环")
    public List<Map<String,Object>> CustomDataDeal(List<Map<String, Object>> datas) throws Exception {
        for(Map<String,Object> data:datas){
            ArrayList sites=(ArrayList)data.get("CustomerSiteDTOs");
            for(Object site : sites){
                Map<String,Object> sitemap=(Map<String,Object>)site;
                sitemap.put("Code", sitemap.get("Code1"));
                sitemap.put("Name", sitemap.get("Name1"));
                sitemap.put("DescFlexField",sitemap.get("DescFlexField1"));
            }
        }
        return datas;


    }
}
